<?php
namespace app\center\logic;

class HistoryMatterCompanyLogic extends BaseLogic {

    /**
     * 获取历史事项公司查询条件
     * @param $from_openid
     * @param $source
     * @param $confirm_status
     * @param $matter_status
     * @param $start_time
     * @return array
     */
    public function get_search_hmc_maps($from_openid,$source,$confirm_status,$matter_status,$start_time){
        $maps = [];
        //$maps[] = ['status','=',1];
        if(!empty($from_openid)){
            $maps[] = ['from_openid','=',$from_openid];
        }

        if($source != -1){
            $maps[] = ['source','=',$source];
        }

        if($confirm_status != -1){
            $maps[] = ['confirm_status','=',$confirm_status];
        }

        if($matter_status != -1){
            $maps[] = ['status','=',$matter_status];
        }

        if(!empty($start_time)){
            $maps[] = ['c_time','like',$start_time . '%'];
        }
        return $maps;
    }
}